package com.yzmoney.common.util;

/**
 * Created by LiuJun on 2015/6/24.
 */
public class JDKStackTrace {
    public static String getJDKStrack(Throwable t) {
        StackTraceElement trace[] = t.getStackTrace();
        StringBuffer b = new StringBuffer(200);
        b.append("\n");
        b.append(t.toString());
        b.append("\n");

        for (int i = 0; i < trace.length; i++) {
            b.append("          at ");
            b.append(trace[i].toString());
            b.append("\n");
        }
        return b.toString();
    }
}
